int Count_Number (int N)
{ 
    int i = 0,sum = 0;
    if(N==0)
    {
        return 1;
    }
    while(N>0&&N<0)
    {
        sum = sum+N%10;
        i++;
        N=N/10;
    }
    return sum;
}
#include <stdio.h>

int Count_Number (int N);

int main()
{

  int N, D=0;

  scanf("%d",&N);
 
  D=Count_Number(N);
  printf("%d", D);
  return 0;
}

